'''
Created on Jun 1, 2009

@author: morales
'''

class Epoch_Constant:
    
    def __init__( self, generationsAgo, Nt, NO ):
        self.time = generationsAgo / (4.0 * NO)
        self.fraction = Nt / NO
        
    def getParameterString( self ):
        if self.time == 0.0:
            return ' '
        
        rValue = '-eN %f %f' % (self.time, self.fraction)
        return rValue
    

class Epoch_Growth:
    
    def __init__( self, generationsAgo, rate, N0 ):
        self.time = generationsAgo / (4.0 * N0)
        self.growthRate = rate
        
    def getParameterString( self ):
        rValue = '';
        
        if self.time == 0.0:
            rValue += '-G %f' % (self.growthRate)
        else:
            rValue += '-eG %f %f' % (self.time, self.growthRate)
        
        return rValue
    
    
class Epoch2_CC:
    
    def __init__( self, generationsAgo, N1, N0 ):
        self.time = generationsAgo / (4.0 * N0)
        self.popRatio1 = N1 / N0
        
    def getParameterString( self ):
        rValue = '';
        
        rValue += '-eN %f %f' % (self.time, self.popRatio1)
        
        return rValue
    